import request from '@/utils/request'

export function getTree(data) {
  return request({
    url: '/admin.php?s=Admin.Basic_Menus.MenuList',
    method: 'post',
    data,
  })
}

export function getTreeDetail(data) {
  return request({
    url: '/admin.php?s=Admin.Basic_Menus.MenuDetail',
    method: 'post',
    data,
  })
}

export function addTree(data) {
  return request({
    url: '/admin.php?s=Admin.Basic_Menus.AddMenu',
    method: 'post',
    data,
  })
}

export function doEdit(data) {
  return request({
    url: '/admin.php?s=Admin.Basic_Menus.UpdateMenu',
    method: 'post',
    data,
  })
}

export function doSwitch(data) {
  return request({
    url: '/admin.php?s=Admin.Basic_Menus.ModifyMenuStatus',
    method: 'post',
    data,
  })
}

export function doDelete(data) {
  return request({
    url: '/admin.php?s=Admin.Basic_Menus.DeleteMenu',
    method: 'post',
    data,
  })
}
